<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* .container {
        color: red;
        width: 100%;
      } */
      /* .container a {
        color: red;
        text-decoration: none;
      } */
      /* * {
        margin: 0;
        padding: 0;
      } */

      a {
        text-decoration: none;
        color: inherit;
      }

      .container1 {
        color: red;
        margin-left: auto;
        margin-right: auto;
        width: 200px;
        background: lightblue;
      }
      .container2 {
        color: blue;
      }
    </style>
  </head>
  <body>
    <div class="container1">
      <a href="">百度</a>
      <p>一个段落</p>
    </div>

    <div class="container2">
      <a href="">百度</a>
      <p>一个段落</p>
    </div>
  </body>
</html>

